home *** CD-ROM | disk | FTP | other *** search
- unit TheDLLUnit;
-
- interface
-
- uses
- Windows;
-
- function DoSomething(Value: Integer): Bool; stdcall;
-
- implementation
-
- uses
- Dialogs, ErrorMsgs;
-
- function DoSomething(Value: Integer): Bool;
- begin
- Result := False;
- if Value < 0 then
- SetLastError(ERROR_NUMBER_NEGATIVE)
- else if Value > 1000 then
- SetLastError(ERROR_NUMBER_TOO_BIG)
- else
- begin
- Result := True;
- ShowMessageFmt('Value passed was %d', [Value])
- end
- end;
-
- end.
-